import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant';
import { PermissionEnum } from '@/enums/permissionEnum'

const route: AppRouteModule = {
  path: '/task',
  name: 'task',
  component: LAYOUT,
  redirect: '/task',
  meta: {
    orderNo: 5000,
    icon: 'ant-design:schedule-outlined',
    title: '任务调度',
    permissions: [PermissionEnum.TASK_VIEW, PermissionEnum.TASK_MANAGE],
  },
  children: [
    {
      path: 'index',
      name: 'task',
      component: () => import('@/views/wex/task/index.vue'),
      meta: {
        title: '任务调度',
        permissions: [PermissionEnum.TASK_VIEW, PermissionEnum.TASK_MANAGE],
      },
    },
    {
      path: 'log',
      name: 'task-log',
      component: () => import('@/views/wex/taskLog/index.vue'),
      meta: {
        title: '执行日志',
        permissions: [PermissionEnum.TASK_VIEW, PermissionEnum.TASK_MANAGE],
      },
    },
  ],
};

export default route;
